# -*- coding: utf-8 -*-
#==============================================================
# @Descripttion: 
# @version: 
# @Author: weni09
# @Date: 2021-03-24 10:51:49
# @LastEditors: weni09
# @LastEditTime: 2021-04-07 17:43:59
# @FilePath: \blogfastapi\apps\admin\test.py
#==============================================================

#
# print(datetime.strftime(datetime.now(),'%Y-%m-%d %H:%M:%S.%f')[:-3])
#
# print('2021-03-22T02:05:02.789908+00:00'.replace('T',' ').split('+')[0])
#
# print(datetime.now().year)
#
# body = {'username': 'admin','is_superuser': True,'last_login': '2021-03-25 00:45:52.638203'}
# print(datetime(2021, 3, 25, 0, 45, 52, 638203))
#
# print(datetime.utcnow()+timedelta(minutes=30))
#
# from base64 import b64decode
# payload = "eyJ1c2VyIjp7InVzZXJuYW1lIjoiYWRtaW4iLCJpc19zdXBlcnVzZXIiOnRydWUsImF2YXRhciI6Imh0dHA6Ly93ZW5pMDkuZ2l0ZWUuaW8vcGljYmVkL2F2YXRhci8yLnBuZyJ9LCJ1c2VyX2lkIjoxLCJleHAiOjE2MjA4OTM5MDYsImlhdCI6MTYyMDg5MjEwNn0"
# payload += (4 - len(payload) % 4) * "="
# print(b64decode(payload).decode())
# # print(datetime.utcnow())
#
# print(datetime.fromtimestamp(1620893906),datetime.now(),datetime.utcnow())
# eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjp7InVzZXJuYW1lIjoiYWRtaW4iLCJpc19zdXBlcnVzZXIiOnRydWUsImF2YXRhciI6IiBodHRwOi8vd2VuaTA5LmdpdGVlLmlvL3BpY2JlZC9hdmF0YXIvMi5wbmcifSwidXNlcl9pZCI6MSwiZXhwIjoxNjE3NzY1NzEzLCJpYXQiOjE2MTc3NjU0MTN9.Qwnb0qb4vYtA7ZviY4v_FNoxdylN4OYRrW9PIkd0lGA


# from urllib import parse
#
# print(parse.unquote('http://127.0.0.1:8081/upload/image?filePath=%22%22'))

# from main.utils.MyHashEncryptor import MyHashEncryptor as hash
#
# print(hash.myencryped('md5', '123456randompassword'))
#
# # from passlib.hash import md5_crypt
# #
# # print(md5_crypt.encrypt('123456randompassword'))
from admin.fastapi_admin.common import pwd_context
"a25686038caa8ce704be11ffcd434198"
print(pwd_context.hash('a25686038caa8ce704be11ffcd434198'))